# 路由入口文件
from flask import Flask,request,json,jsonify,render_template
from .hello import r_hello,r_upload # 引入子路由文件
from .admin import r_user



def routerMain(app): 
    app.add_url_rule('/hello',view_func=r_hello.hello,methods=['GET','POST'])
    # 文件上传
    app.add_url_rule('/upload',view_func=r_upload.upload,methods=['GET','POST'])

    # 后台管理
    app.add_url_rule('/admin/login',view_func=r_user.login,methods=['GET','POST'])
    app.add_url_rule("/admin/index",view_func=r_user.main,methods=['GET'])



    
